package Behavioral.ChainOfResponsibility.demo1;

public class ChainOfResponsibilityDemo1 {

	public static void main(String[] args) {
		CyMsg msg = new CyMsg(":)  <script> alert('bloom!!!');</script>  cy.com");

		FilterChain fc1 = new FilterChain();
		fc1.add(new FaceFilter()).add(new HTMLFilter());

		FilterChain fc2 = new FilterChain();
		fc2.add(new URLFilter());

		fc1.add(fc2);

		fc1.doFilter(msg);
		System.out.println(msg);
	}
}
